﻿using System;
using System.Collections.Generic;


namespace advadev.CanOpen
{

    /// <summary>
    /// Represents a emergency object received event argument
    /// </summary>
    public class EmergencyObjectReceivedEventArgs
    {

        /// <summary>
        /// Initializes a new instance of the EmergencyObjectReceivedEventArgs
        /// class by the given parameter
        /// </summary>
        /// <param name="emergencyErrorCode">
        /// Received emergency error code
        /// </param>
        /// <param name="errorRegister">
        /// Received error register
        /// </param>
        /// <param name="manufacturerSpecificErrorCode">
        /// Received manufacturer specific error code
        /// </param>
        public EmergencyObjectReceivedEventArgs(CanOpenErrorCode emergencyErrorCode, CanOpenErrorRegister errorRegister, ulong manufacturerSpecificErrorCode)
        {
            EmergencyErrorCode = emergencyErrorCode;
            ErrorRegister = errorRegister;
            ManufacturerSpecificErrorCode = manufacturerSpecificErrorCode;
        }


        /// <summary>
        /// Gets the received emergency error code
        /// </summary>
        public CanOpenErrorCode EmergencyErrorCode
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets the received error register
        /// </summary>
        public CanOpenErrorRegister ErrorRegister
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets the received manufacturer specific error code
        /// </summary>
        public ulong ManufacturerSpecificErrorCode
        {
            get;
            private set;
        }

    }

}
